#ifndef SLANPROJECTFILEDOCK_H
#define SLANPROJECTFILEDOCK_H
#include <QDockWidget>

#include <QAction>
#include <QTreeWidget>

class SlanProjectFileDock : public QDockWidget
{
    Q_OBJECT

public:
    SlanProjectFileDock(const QString &name,QWidget * parent = 0);

    void createWidgets();           //创建部件
    void createContextMenu();       //创建右键菜单

    void readDirTreeStruct();
    void writeDirProTreeStruct();

    void createProjectTree(QString &, QString &);//创建树形目录
    void createFolder();    //添加目录
    void createTreeWidgetItem(const QString &, QTreeWidgetItem * );

private slots:
    void slotCreateFile();

signals:
    void createdFile(const QString&);



private:
    enum
    {
        CreateFile = 0,
        CreateFolder,
        MenuNumMax
    };


    QAction * actionArray[MenuNumMax];
    QTreeWidget * projectTree;
    QString homePath;
    QWidget *parent;

//private slots:
//    void slotopen();

//    create
};


#endif // SLANPROJECTFILEDOCK_H
